<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=no, width=device-width" name="viewport">
    <title>仟途旅游给你发红包了</title>
</head>
<body style="zoom: 1;padding:0px; margin:0px;background-color: #ff4424;font-family: '微软雅黑';color: yellow;">


<img style="width:100%;padding:0px; margin:0px; height:12em" src="__PUBLIC__/images/hongbao/gong.jpg">

<div  style="width:100%;right:0;left:0;margin-top: 1em;text-align:center;margin-left: auto;margin-right: auto">
    <div style="width:16em;height:auto;border-radius: 10px;border:3px solid yellow;margin-left: auto;margin-right: auto;padding-left: 1em;padding-right: 1em">
        <p style="margin-top: 3px;margin-bottom: 10px;font-size: 1.2em" id="text" >祝福点名——活动规则</p>
        <p style="margin-top: 0px;margin-bottom: 0px;text-align:left;">1.写下本人姓名，和你想祝福点名的人的姓名，还有你想说的祝福话语！</p>
        <p style="margin-top: 0px;margin-bottom: 0px;text-align:left;">2.当你填写好点名信息后请转发软文给祝福点名的朋友，通知他/她也参与活动，写上对你的祝福。当双方都发送给对方祝福后，会马上随机得到旅游优惠卡或现金红包一份！</p>
        <p style="margin-top: 0px;margin-bottom: 0px;text-align:left;">3.奖品旅游优惠卡会马上发送，现金红包会统一在年初一（2月8日）晚上21点发送！</p>
        <p style="margin-top: 0px;margin-bottom: 0px;text-align:left;">4.注意：本人与对方双方姓名要确保书写正确，否则系统没办法准确辨识。</p>
    </div>
</div>
<div style="width:100%;right:0;left:0;margin-top: 1em;text-align:center;margin-left: auto;margin-right: auto">
    <form action="{:U('Redpack/second')}"method="post">
        <label for="myname" style="font-size: large">本人姓名:</label>
        <input style="background-color: #ff4424;zoom: 1;padding-top: 3px;padding-left: 10px;
        padding-right: 10px;padding-bottom: 3px;border-radius: 10px;border:1px solid yellow;
        color:white;font-size: large" placeholder="祝福人"
               size="15" type="text" name="myname" id="myname">
        <br><br>
        <label for="yourname" style="font-size: large">朋友姓名:</label>
        <input style="background-color: #ff4424;zoom: 1;padding-top: 3px;padding-bottom: 3px;
        padding-left: 10px;padding-right: 10px;border-radius: 10px;border:1px solid yellow;
        color:white;font-size: large" placeholder="被祝福人"
               size="15" type="text" name="yourname" id="yourname">
        <br><br>
        <div style="margin-left: auto;margin-right: auto;height: 2em">
            <div style="float:left;width: 4em;padding-left: 4em">
                <label for="zhufuyu"style="font-size: large;">祝福语:</label>
            </div>
            <div style="float: left;margin-left: 0.3em;">
                <textarea name="zhufuyu" id="zhufuyu" cols="15" rows="2" style="background-color: #ff4424;zoom: 1;padding-top: 3px;padding-bottom: 3px;
        padding-left: 10px;padding-right: 10px;border-radius: 10px;border:1px solid yellow;
        color:white;font-size: large"></textarea>

            </div>

        </div>
        <br><br>
        <p style="margin-top: -1em; display: block" id = >（祝福语只能数字，字母和中文组合哦）</p>
        <p style="margin-top: -1em; display: none" id = "check"></p>
        <button id="cj" onclick="return check()" style="background-color: yellow;font-size: large;font-family: '微软雅黑';border-radius: 10px;border:3px solid yellow;">提交</button>

    </form>


</div>
<div  style="width:100%;right:0;left:0;margin-top: 1em;text-align:center">
    <h2>仟途旅游祝你新春快乐！</h2>
</div>
</body>
<script src="__PUBLIC__/js/jquery.js"></script>

<script>

    function check(){
        var a = document.getElementById("check");
        var myname = document.getElementById("myname");
        var yourname = document.getElementById("yourname");
        var zhufuyu = document.getElementById("zhufuyu");
        var guanzhu = document.getElementById("cj");
        var check = $('#check');
        var fail = "{:isset($flag)?$flag:''}";
        if(fail=="fail"){
            check.attr('style','display:block');
            a.innerHTML = '请先关注公众号"仟途旅游"';
            $('#cj').attr('onclick',"return guanzhu()");
            guanzhu.innerHTML= '去关注';
            return false;
        }
        if(isNull(myname.value)) {
            check.attr('style','display:block');
            a.innerHTML = '本人姓名不能为空';
            return false;
        }
        if(isNull(yourname.value)) {
            check.attr('style','display:block');
            a.innerHTML = '朋友姓名不能为空';
            return false;
        }
        if(isNull(zhufuyu.value)) {
            check.attr('style','display:block');
            a.innerHTML = '祝福语不能为空';
            return false;
        }

        return true;
    }

    function guanzhu(){
        window.location.href='http://mp.weixin.qq.com/s?__biz=MzA3MzM5MjI0Ng==&mid=404935172&idx=1&sn=43a12e79fad7c8d1142e17c5535f4d47&scene=1&srcid=0207AuXjPBo9EbtEwx3Q624D&from=singlemessage&isappinstalled=0#wechat_redirect';
        return false;
    }

    function isNull( str ){
        if ( str == "" ) return true;
        var regu = "^[ ]+$";
        var re = new RegExp(regu);
        return re.test(str);
    }
</script>
</html>